<?php
/* Some change */
error_reporting(E_ALL | E_STRICT);

define('MYAPP_CONFIG_HOME','/home/ahundiak/ws2009/');

class Import
{
	protected $context = NULL;
	
	function __construct()
	{
        ini_set('include_path','.' .      
            PATH_SEPARATOR . MYAPP_CONFIG_HOME . 'osso2010/data/classes' .   
            PATH_SEPARATOR . MYAPP_CONFIG_HOME . 'Cerad/library'   
        );
        require_once 'Cerad/Loader.php';
        Cerad_Loader::registerAutoload();
        
        $dbParams = array (
            'host'     => '127.0.0.1',
            'username' => 'impd',
            'password' => 'impd894',
            'dbname'   => 'osso2007',
            'dbtype'   => 'mysql',
            'adapter'  => 'pdo_mysql'
        );
        $dbEaysoParams = array (
            'host'     => '127.0.0.1',
            'username' => 'impd',
            'password' => 'impd894',
            'dbname'   => 'eayso',
            'dbtype'   => 'mysql',
            'adapter'  => 'pdo_mysql'
        );
         
        $this->context = $context = new Cerad_Context(array(
        	'db'      => $dbParams,
        	'dbEayso' => $dbEaysoParams,
        ));
	}
	public function execute()
	{
		echo "OSSO2010 Import\n";
		
		$path = '/home/data/';
		
		$import = new ImportEaysoVolCerts($this->context);
		$import->process($path . 'Area5cCertsReferee20090827.xml');
	}
}
$import = new Import();
$import->execute();
?>